package com.hdu.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;


@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class User implements Serializable {

    private static final long serialVersionId = 1L;

    private Integer id;

    private String username;

    public User(String username, String password, Role role) {
        this.username = username;
        this.password = password;
        this.role = role;
    }


    private String password;
    private String email;
    private String phone;
    private Role role;
    private LocalDateTime createTime;


    public enum Role {
        USER,
        STUDENT,
        TEACHER,
        ADMIN
    }
}